Simon McVittie [Mon, 30 Jul 2018 15:51:01 +0000 (16:51 +0100)]
Skip test-pull-repeated during CI
This test is expected to fail a small proportion of the time. During
the build of ostree 2018.7-1 in Debian, it seems we were unlucky on
s390x. Non-deterministic tests are also problematic for autopkgtest,
where they can gate migration of our dependencies like GLib, so skip
this test unless the caller has opted-in to non-deterministic tests.
It would be appropriate to enable this test in environments where
failures can easily be retried and are not disruptive to other
packages.
Signed-off-by: Simon McVittie <smcv@debian.org>
Gbp-Pq: Topic debian
Gbp-Pq: Name Skip-test-pull-repeated-during-CI.patch
Simon McVittie [Tue, 5 Oct 2021 22:51:37 +0000 (23:51 +0100)]
test-commit-sign.sh: Skip a unit test when running as an installed-test
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://github.com/ostreedev/ostree/pull/2459
Applied-upstream: 2021.6, commit:
92ed1857ae49a5e4d16bea345b6b5bf6671bf990
Gbp-Pq: Name test-commit-sign.sh-Skip-a-unit-test-when-running-as-an-i.patch
Simon McVittie [Sun, 10 Oct 2021 16:51:51 +0000 (17:51 +0100)]
Release to unstable
Simon McVittie [Sun, 10 Oct 2021 16:39:45 +0000 (17:39 +0100)]
New upstream release
- Update symbols file
Simon McVittie [Sun, 10 Oct 2021 16:35:20 +0000 (17:35 +0100)]
Update upstream source from tag 'upstream/2021.5'
Update to upstream version '2021.5'
with Debian dir
18336141e32a1132d6f87bc481234c1a335fa76c
Simon McVittie [Sun, 10 Oct 2021 16:35:12 +0000 (17:35 +0100)]
New upstream version 2021.5
Simon McVittie [Sun, 10 Oct 2021 16:35:06 +0000 (17:35 +0100)]
Update changelog
Simon McVittie [Sun, 10 Oct 2021 16:34:46 +0000 (17:34 +0100)]
Mark a patch as applied upstream
Simon McVittie [Tue, 5 Oct 2021 22:54:00 +0000 (23:54 +0100)]
Release to unstable
Simon McVittie [Tue, 5 Oct 2021 22:53:09 +0000 (23:53 +0100)]
Add patch to fix installed-tests
Simon McVittie [Tue, 5 Oct 2021 22:08:55 +0000 (23:08 +0100)]
Remove Lintian override for #947258, fixed in lintian 2.105.0
Simon McVittie [Tue, 5 Oct 2021 21:43:45 +0000 (22:43 +0100)]
Bump debhelper compat level from 12 to 13
- debian/rules: Drop --fail-missing argument to dh_missing, which is
now the default.
Changes-By: lintian-brush
Fixes: lintian: package-uses-old-debhelper-compat-version
See-also: https://lintian.debian.org/tags/package-uses-old-debhelper-compat-version.html
Simon McVittie [Tue, 5 Oct 2021 20:27:43 +0000 (21:27 +0100)]
Drop patch that was applied upstream
Simon McVittie [Tue, 5 Oct 2021 20:25:28 +0000 (21:25 +0100)]
d/control: Canonicalize field name case Multi-arch => Multi-Arch
Changes-By: lintian-brush
Fixes: lintian: cute-field
See-also: https://lintian.debian.org/tags/cute-field.html
Simon McVittie [Tue, 5 Oct 2021 20:25:10 +0000 (21:25 +0100)]
Standards-Version: 4.6.0 (no further changes)
Simon McVittie [Tue, 5 Oct 2021 20:24:33 +0000 (21:24 +0100)]
d/copyright: Update
Simon McVittie [Tue, 5 Oct 2021 20:05:24 +0000 (21:05 +0100)]
Update symbols file
Simon McVittie [Tue, 5 Oct 2021 20:04:04 +0000 (21:04 +0100)]
New upstream release
Simon McVittie [Tue, 5 Oct 2021 20:01:50 +0000 (21:01 +0100)]
Update upstream source from tag 'upstream/2021.4'
Update to upstream version '2021.4'
with Debian dir
62caccdb763680564f5ec02ffa2178ae1fe1ac77
Simon McVittie [Tue, 5 Oct 2021 20:01:43 +0000 (21:01 +0100)]
New upstream version 2021.4
Colin Walters [Tue, 5 Oct 2021 19:59:43 +0000 (15:59 -0400)]
Release 2021.5
Jonathan Lebon [Tue, 5 Oct 2021 15:56:02 +0000 (11:56 -0400)]
Merge pull request #2449 from cgwalters/mtree-from-commit
Colin Walters [Tue, 5 Oct 2021 14:49:01 +0000 (10:49 -0400)]
Merge pull request #2454 from lucab/ups/auto-txn-complete
repo/private: allow committing/aborting through a transaction guard
Luca BRUNO [Fri, 1 Oct 2021 16:04:02 +0000 (16:04 +0000)]
repo/private: allow committing/aborting through a transaction guard
This enhances the auto-transaction logic, augmenting the scope of a
transaction guard.
It allows committing or aborting a transaction through its guard.
It also supports tracking the completion status of a transaction
guard, avoiding double commits/aborts, while retaining the auto-cleanup
logic.
Jonathan Lebon [Mon, 4 Oct 2021 20:54:44 +0000 (16:54 -0400)]
Merge pull request #2453 from cgwalters/etc-ignore-sockets
Colin Walters [Thu, 30 Sep 2021 19:53:18 +0000 (15:53 -0400)]
deploy: Ignore sockets, fifos in /etc during merge
https://bugzilla.redhat.com/show_bug.cgi?id=
1945274 is an issue where a privileged
kubernetes daemonset is writing a socket into `/etc`. This makes ostree upgrades barf.
Now, they should clearly move it to `/run`. However, one option is for us to
just ignore it instead of erroring out. Some brief investigation shows that
e.g. `git add somesocket` is a silent no-op, which is an argument in favor of ignoring it.
Closes: https://github.com/ostreedev/ostree/issues/2446
Colin Walters [Thu, 30 Sep 2021 17:21:15 +0000 (13:21 -0400)]
lib: Add an API to construct a `MutableTree` from a commit
This is nicer than having the caller parse the commit
object, or indirect via the `OstreeRepoFile*` object of the root.
Will be used in ostree-rs-ext around tar parsing.
Colin Walters [Thu, 30 Sep 2021 21:25:30 +0000 (17:25 -0400)]
Merge pull request #2447 from cgwalters/sepolicy-for-commit
repo: Add an API to init `OstreeSePolicy` from commit directly
Jonathan Lebon [Thu, 30 Sep 2021 20:33:47 +0000 (16:33 -0400)]
Merge pull request #2451 from cgwalters/fsck-happy
Jonathan Lebon [Thu, 30 Sep 2021 20:15:45 +0000 (16:15 -0400)]
Merge pull request #2450 from cgwalters/revdep-ext-ci
Colin Walters [Thu, 30 Sep 2021 15:38:10 +0000 (11:38 -0400)]
sepolicy: Add deprecation comment for `_get_path()`
Came up in review
https://github.com/ostreedev/ostree/pull/2447#issuecomment-
931428312
Colin Walters [Tue, 28 Sep 2021 21:40:28 +0000 (17:40 -0400)]
repo: Add an API to init `OstreeSePolicy` from commit directly
This is part of `OstreeCommitModifier`, but I'm not using
that in some of the ostree-ext Rust code.
It just makes more sense as a direct policy API, where it should
have been in the first place. There's already support for
setting a policy object on a commit modifier, so that's all the
old API needs to do now.
Colin Walters [Thu, 30 Sep 2021 18:09:22 +0000 (14:09 -0400)]
fsck: Print a success message
There's a general Unix philosophy that "silence is golden".
However, when one is explicitly invoking an error check it's nice
to see explicit success.
We already print various statistics, so ending with a happy
note has no extra cost.
Colin Walters [Thu, 30 Sep 2021 17:38:25 +0000 (13:38 -0400)]
tests: Use ostree-ext 0.3.0
This updates to the modern glib 0.14 and paves the way for
some reverse dependency testing by using ostree-ext's code.
Colin Walters [Thu, 30 Sep 2021 17:26:00 +0000 (13:26 -0400)]
Merge pull request #2448 from cgwalters/fix-selinux-policy
bin/commit: Fix --tree=tar with --selinux-policy
Colin Walters [Wed, 29 Sep 2021 13:03:24 +0000 (09:03 -0400)]
bin/commit: Fix --tree=tar with --selinux-policy
The logic for `--selinux-policy` ended up in the `--tree=dir`
path, but there's no reason for that. Fix the imported
labeling with `--tree=tar`. Prep for use with containers.
We had this bug because the previous logic was trying to avoid
duplicating the code for generic `--selinux-policy` and
the case of `--selinux-policy-from-base --tree=dir`.
It's a bit more code, but it's cleaner if we dis-entangle them.
Colin Walters [Mon, 13 Sep 2021 18:19:19 +0000 (14:19 -0400)]
Merge pull request #2440 from cgwalters/unit-test-counting
two small unit test patches
Colin Walters [Fri, 10 Sep 2021 21:07:42 +0000 (17:07 -0400)]
tests: Add new TAP APIs
Having to touch a global test counter when adding tests is
a recipe for conflicts between PRs.
The TAP protocol allows *ending* with the expected number of
tests, so the best way to do this is to have an explicit
API like our `tap_ok` which bumps a counter, then end with `tap_end`.
I ported one test as a demo.
Colin Walters [Fri, 10 Sep 2021 21:06:56 +0000 (17:06 -0400)]
tests/pull-test: Avoid duplicating test numbers
We do this in other places; avoids touching two numbers when
adding tests. Let computers do the addition.
Colin Walters [Thu, 9 Sep 2021 11:34:59 +0000 (07:34 -0400)]
Merge pull request #2438 from cgwalters/release-2021.4
Release 2021.4
Colin Walters [Wed, 8 Sep 2021 18:01:17 +0000 (14:01 -0400)]
configure: post-release version bump
Colin Walters [Wed, 8 Sep 2021 18:00:12 +0000 (14:00 -0400)]
Release 2021.4
Colin Walters [Wed, 8 Sep 2021 13:27:26 +0000 (09:27 -0400)]
Merge pull request #2434 from cgwalters/custom-remote
Add support for "custom remotes"
Colin Walters [Tue, 7 Sep 2021 22:02:24 +0000 (18:02 -0400)]
Add support for "custom remotes"
This will be helpful for the "ostree native container" work in
https://github.com/ostreedev/ostree-rs-ext/
Basically in order to reuse GPG/signapi verification, we need
to support adding a remote, even though it can't be used via
`ostree pull`. (At least, not until we merge ostree-rs-ext into ostree, but
even then I think the principle stands)
Luca Bruno [Wed, 8 Sep 2021 08:52:54 +0000 (08:52 +0000)]
Merge pull request #2435 from RBuddel/fix-delta-files-resume-legacy-transaction
repo-pull: legacy_transaction_resuming flag ignored
Luca Bruno [Wed, 8 Sep 2021 08:18:00 +0000 (08:18 +0000)]
Merge pull request #2430 from cgwalters/stabilize-staging
upgrade: Stabilize deployment staging
Buddelmann, Richard RB [Wed, 8 Sep 2021 06:41:05 +0000 (08:41 +0200)]
repo-pull: legacy_transaction_resuming flag ignored
for deltafiles the legacy_transaction_resuming flag is not used,
which will mark the commit as done, even if files are missing.
using already existing commitstate_is_partial function as fix
Colin Walters [Thu, 2 Sep 2021 20:59:15 +0000 (16:59 -0400)]
upgrade: Stabilize deployment staging
We're waaay overdue for this, it's been the default
in rpm-ostree for years, and solves several important bugs
around not capturing `/etc` while things are running.
Also, `ostree admin upgrade --stage` (should) become idempotent.
Closes: https://github.com/ostreedev/ostree/issues/2389
Colin Walters [Tue, 7 Sep 2021 19:07:59 +0000 (15:07 -0400)]
Merge pull request #2428 from lucab/ups/tests-selinux-basic
tests: fix bare mode unprivileged 'make check'
Luca BRUNO [Mon, 30 Aug 2021 15:55:16 +0000 (15:55 +0000)]
tests: skip a broken fsck case
There are some existing issues around fsck in unprivileged bare mode,
so this test does not really work at the moment. Leaving it as a FIXME
for the moment.
Luca BRUNO [Mon, 30 Aug 2021 14:11:43 +0000 (14:11 +0000)]
tests/basic: avoid changing ownership
This avoids possible issues when trying to chmod, tweaking
permissions instead.
Colin Walters [Thu, 26 Aug 2021 16:47:00 +0000 (12:47 -0400)]
tests/basic: Skip --no-xattrs if we have selinux
It cannot work to use `--no-xattrs` when SELinux is enabled
because we get a `security.selinux` attribute on created files
regardless. So just skip this test if true.
Also add some `ostree fsck`s in here which helped me debug
this.
Luca BRUNO [Mon, 30 Aug 2021 14:10:05 +0000 (14:10 +0000)]
libtest: tweak selinux/relabel message
Colin Walters [Tue, 31 Aug 2021 12:04:21 +0000 (08:04 -0400)]
Merge pull request #2340 from cgwalters/sign-verify-api
Add an API to verify a commit signature explicitly
Colin Walters [Mon, 12 Apr 2021 22:42:05 +0000 (18:42 -0400)]
Add an API to verify a commit signature explicitly
We have a bunch of APIs to do GPG verification of a commit,
but that doesn't generalize to signapi. Further, they
require the caller to check the signature status explicitly
which seems like a trap.
This much higher level API works with both GPG and signapi.
The intention is to use this in things that are doing "external
pulls" like the ostree-ext tar import support. There we will
get the commitmeta from the tarball and we want to verify it
at the same time we import the commit.
Luca Bruno [Fri, 27 Aug 2021 07:34:46 +0000 (07:34 +0000)]
Merge pull request #2426 from cgwalters/xattrs-bareuseronly-union
checkout: Also ignore xattrs for union in bare-user-only mode
Luca Bruno [Fri, 27 Aug 2021 07:33:27 +0000 (07:33 +0000)]
Merge pull request #2425 from cgwalters/hardlink-correct-errno
checkout: Save errno when re-throwing
Colin Walters [Thu, 26 Aug 2021 19:25:52 +0000 (15:25 -0400)]
checkout: Also ignore xattrs for union in bare-user-only mode
Followup to PRs related to https://github.com/ostreedev/ostree/issues/2410
Since the test suite now covers this the test was failing on
a Fedora SELinux enabled host where we see `security.selinux`
even if not in the commit.
Colin Walters [Thu, 26 Aug 2021 21:25:59 +0000 (17:25 -0400)]
Merge pull request #2424 from cgwalters/test-nonroot-ci
ci: Run GH action CI build+test as non-root
Dan Nicholson [Thu, 26 Aug 2021 19:33:23 +0000 (13:33 -0600)]
Merge pull request #2422 from cgwalters/allow-none-detached
lib: Change read_commit_detached_metadata to be nullable
Colin Walters [Thu, 26 Aug 2021 19:16:37 +0000 (15:16 -0400)]
checkout: Save errno when re-throwing
I was seeing an `EPERM` here which was confusing.
It turned out the real error was `EEXIST`.
Since we're referring to the original error, but we do a
lot of computation in the middle, we need to save errno.
Colin Walters [Thu, 26 Aug 2021 13:53:56 +0000 (09:53 -0400)]
ci: Run main GH action CI build+test as non-root
This is really the standard best practice, matching how
e.g. dpkg/rpm work, as well as most local development
environments (including mine) with e.g. `toolbox`.
Colin Walters [Wed, 25 Aug 2021 19:18:43 +0000 (15:18 -0400)]
lib: Change read_commit_detached_metadata to be nullable
Hit this while working on some Rust code.
Colin Walters [Wed, 25 Aug 2021 21:45:28 +0000 (17:45 -0400)]
Merge pull request #2421 from lucab/ups/auto-txn-fixes
lib: improve transactions auto-cleanup logic
Luca BRUNO [Wed, 25 Aug 2021 12:30:21 +0000 (12:30 +0000)]
lib: improve transactions auto-cleanup logic
This fixes some aspects of OstreeRepoAutoTransaction and re-aligns
it with the logic in flatpak. Specifically:
* link to the underlying repo through refcounting
* bridge internal errors to warning messages
* verify the input pointer type
This is a preparation step before exposing this logic as a public API.
Luca Bruno [Tue, 24 Aug 2021 14:28:39 +0000 (14:28 +0000)]
Merge pull request #2418 from lucab/ups/lib-commit-xattrs
commit: automatically skip xattrs in bare-user-only mode
Luca BRUNO [Mon, 23 Aug 2021 09:46:22 +0000 (09:46 +0000)]
tests: update several bare-user-only checks
Luca BRUNO [Mon, 23 Aug 2021 13:08:44 +0000 (13:08 +0000)]
lib/commit: automatically skip xattrs in bare-user-only mode
Luca BRUNO [Mon, 23 Aug 2021 13:08:53 +0000 (13:08 +0000)]
builtins/commit: set up relevant flags in bare-user-only mode
This detects bare-user-only mode and automatically enables a
commit modifier with relevant flags.
Luca BRUNO [Mon, 23 Aug 2021 13:51:55 +0000 (13:51 +0000)]
lib/diff: automatically skip xattrs in bare-user-only mode
Luca Bruno [Tue, 24 Aug 2021 07:55:59 +0000 (07:55 +0000)]
Merge pull request #2419 from dbnicholson/gpg-list-keys
bin/remote: Rename list-gpg-keys to gpg-list-keys
Dan Nicholson [Mon, 23 Aug 2021 17:09:24 +0000 (11:09 -0600)]
bin/remote: Rename list-gpg-keys to gpg-list-keys
As pointed out in the original review, `gpg-list-keys` fits better
alongside the existing `gpg-import`.
Changes were done with:
```
git grep -l list-gpg-keys | xargs sed -i 's/list-gpg-keys/gpg-list-keys/'
for src in $(git ls-files '*list-gpg-keys*'); do
dst=${src/list-gpg-keys/gpg-list-keys}
git mv "$src" "$dst"
done
```
Simon McVittie [Mon, 23 Aug 2021 18:31:06 +0000 (19:31 +0100)]
Release to unstable
Colin Walters [Mon, 23 Aug 2021 14:58:36 +0000 (10:58 -0400)]
Merge pull request #2417 from lucab/ups/diff-repo-ignore-xattrs
lib/diff: ignore xattrs if disabled on either repos
Luca BRUNO [Mon, 23 Aug 2021 12:39:02 +0000 (12:39 +0000)]
lib/diff: ignore xattrs if disabled on either repos
This fixes the logic to detect whether xattrs should be automatically
ignored when diffing.
Colin Walters [Fri, 20 Aug 2021 19:12:21 +0000 (15:12 -0400)]
Merge pull request #2412 from lucab/ups/lib-commit-canonicalize
lib/commit: autofix permissions for bare-user-only
Colin Walters [Fri, 20 Aug 2021 19:11:11 +0000 (15:11 -0400)]
Merge pull request #2401 from dbnicholson/gpg-key-info
Remote GPG key info
Luca BRUNO [Fri, 20 Aug 2021 10:58:24 +0000 (10:58 +0000)]
lib/commit: autofix permissions for bare-user-only
This tweaks commit logic to detect bare-user-only repositories and
canonicalize permissions automatically.
Simon McVittie [Fri, 20 Aug 2021 12:12:58 +0000 (13:12 +0100)]
Adjust Lintian overrides
Recent debhelper installs units into /usr/lib/systemd, so adjust our
override to match either way.
Simon McVittie [Fri, 20 Aug 2021 11:36:55 +0000 (12:36 +0100)]
d/rules: Normalize permissions of installed-tests
Simon McVittie [Fri, 20 Aug 2021 11:30:20 +0000 (12:30 +0100)]
Apply patch from upstream to fix tests with SOURCE_DATE_EPOCH
Simon McVittie [Fri, 20 Aug 2021 11:28:31 +0000 (12:28 +0100)]
Revert "d/test.sh, d/tests: Unset SOURCE_DATE_EPOCH"
This reverts commit
d18bfcc689a7676694356710b1f432365334b81a.
Simon McVittie [Fri, 20 Aug 2021 11:28:11 +0000 (12:28 +0100)]
d/gbp.conf: Switch branch back to debian/master
Luca Bruno [Thu, 19 Aug 2021 17:00:14 +0000 (17:00 +0000)]
Merge pull request #2415 from lucab/ups/checksum-canonical-perms
lib/checkout: use canonical permissions in bare-user-only mode
Luca BRUNO [Thu, 19 Aug 2021 14:07:19 +0000 (14:07 +0000)]
lib/repo/checkout: use canonical perms in bare-user-only mode
This automatically enables canonical permissions for checkouts in
bare-user-only mode.
Luca BRUNO [Thu, 19 Aug 2021 13:50:21 +0000 (13:50 +0000)]
lib/core/checksum: add flag to use canonical permissions
This adds a new `OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS`
checksumming flag, which is needed in bare-user-only mode
to ignore local IDs.
Colin Walters [Wed, 18 Aug 2021 13:10:17 +0000 (09:10 -0400)]
Merge pull request #2414 from lucab/ups/cli-commit-modifier-autoptr
builtins/commit: move commit modifier to auto-cleanup
Colin Walters [Wed, 18 Aug 2021 11:59:12 +0000 (07:59 -0400)]
Merge pull request #2411 from lucab/ups/cli-commit-errors
builtins/commit: check for conflicting permissions options
Luca BRUNO [Wed, 18 Aug 2021 09:06:26 +0000 (09:06 +0000)]
builtins/commit: move commit modifier to auto-cleanup
This reduces the usage of goto cleanup logic by porting the commit
modifier pointer to autoptr.
Luca BRUNO [Tue, 17 Aug 2021 10:30:06 +0000 (10:30 +0000)]
builtins/commit: check for conflicting permissions options
This explicitly checks for commit command options asking for both
non-zero UID/GID and canonical permissions at the same time,
which are incompatible.
Luca Bruno [Wed, 4 Aug 2021 06:13:37 +0000 (06:13 +0000)]
Merge pull request #2409 from jlebon/pr/cov-fixes
A couple of Coverity fixes
Jonathan Lebon [Tue, 3 Aug 2021 20:34:32 +0000 (16:34 -0400)]
ostree/dump: Fix free'ing a static string
Reported-by: Seth Arnold <seth.arnold@canonical.com>
Jonathan Lebon [Tue, 3 Aug 2021 20:34:11 +0000 (16:34 -0400)]
lib/sysroot: Fix error message about creating `/var/lib`
Reported-by: Seth Arnold <seth.arnold@canonical.com>
Jonathan Lebon [Tue, 3 Aug 2021 20:33:28 +0000 (16:33 -0400)]
lib/sign-dummy: Handle incorrect signatures correctly
We need to check all signatures for one which passes, not just fail on
the first one.
Reported-by: Seth Arnold <seth.arnold@canonical.com>
Colin Walters [Thu, 29 Jul 2021 00:27:35 +0000 (20:27 -0400)]
Merge pull request #2408 from bgilbert/workflow
workflows: bump lint toolchain; restrict repository access
Benjamin Gilbert [Wed, 28 Jul 2021 22:32:04 +0000 (18:32 -0400)]
workflows: limit permissions to reading repo contents
Move the existing docs permissions stanza to the top of the workflow for
consistency.
Benjamin Gilbert [Wed, 28 Jul 2021 22:30:33 +0000 (18:30 -0400)]
workflows: bump lint toolchain
Luca Bruno [Wed, 28 Jul 2021 08:26:45 +0000 (08:26 +0000)]
Merge pull request #2406 from liujianqiang-niu/main
fix: Avoid wild pointers
刘建强 [Mon, 26 Jul 2021 01:36:26 +0000 (09:36 +0800)]
fix: Avoid wild pointers
Pointer command is dangerous if there is no assignment.
Log: Avoid wild pointers
Luca Bruno [Mon, 26 Jul 2021 11:52:06 +0000 (11:52 +0000)]
Merge pull request #2407 from smcv/tests-source-date-epoch
tests: Unset SOURCE_DATE_EPOCH